<template>
  <div class="demo-title">radio/demo7</div>
  <div class="demo">
    <RadioGroup v-model="value">
      <Radio label="1" class="radio">
        <div>Option Content 1</div>
        <div className="demo-radio-desc">Description</div>
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" />
        </template>
        <template #checkedIcon>
          <Icon name="checked" color="#1677ff" />
        </template>
      </Radio>
      <Radio label="2" class="radio">
        <div>Option Content 2</div>
        <div className="demo-radio-desc">Description</div>
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" />
        </template>
        <template #checkedIcon>
          <Icon name="checked" color="#1677ff" />
        </template>
      </Radio>
    </RadioGroup>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import { Radio, RadioGroup } from '@sscd-mobile/radio'
  import Icon from '@sscd-mobile/icon'
  const value = ref('1')
</script>

<style lang="less" scoped>
  .demo {
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    .radio {
      width: 100%;
      padding: 12px 0;
      &:not(:first-child) {
        border-top: 1px solid #e5e6eb;
      }
    }
    .demo-radio-desc {
      font-size: 12px;
      line-height: 16px;
      margin-top: 6px;
      color: #86909c;
    }
  }
</style>
